package com.heima.search.service;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.search.dtos.UserSearchDto;

import java.io.IOException;

public interface ArticleSearchService {
    /**
     * es搜索文章
     * @param dto
     * @return
     */
    ResponseResult search(UserSearchDto dto) throws IOException;

    /**
     * 异步调用,保存文章的搜索记录
     * @param userId
     * @param searchWords
     */
    void insert(Integer userId, String searchWords);
}
